home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Columbia Kermit
/
kermit.zip
/
newsgroups
/
misc.19971216-19980424
/
000036_news@newsmaster….columbia.edu _Fri Jan 2 15:59:13 1998.msg
< prev
next >
Wrap
Internet Message Format
|
2020-01-01
|
4KB
Return-Path: <news@newsmaster.cc.columbia.edu>
Received: from newsmaster.cc.columbia.edu (newsmaster.cc.columbia.edu [128.59.35.30])
by watsun.cc.columbia.edu (8.8.5/8.8.5) with ESMTP id PAA07357
for <kermit.misc@watsun.cc.columbia.edu>; Fri, 2 Jan 1998 15:59:13 -0500 (EST)
Received: (from news@localhost)
by newsmaster.cc.columbia.edu (8.8.5/8.8.5) id PAA03560
for kermit.misc@watsun; Fri, 2 Jan 1998 15:59:12 -0500 (EST)
Path: news.columbia.edu!watsun.cc.columbia.edu!fdc
From: fdc@watsun.cc.columbia.edu (Frank da Cruz)
Newsgroups: comp.protocols.kermit.misc
Subject: Re: Help with scripting kermit
Date: 2 Jan 1998 20:59:10 GMT
Organization: Columbia University
Lines: 71
Message-ID: <68jkeu$q6b$1@apakabar.cc.columbia.edu>
References: <64j0bn$7s9$1@clem.mscd.edu> <0$k2Rz1fk$EP@cc.usu.edu>
NNTP-Posting-Host: watsun.cc.columbia.edu
Keywords: Echoplex
Xref: news.columbia.edu comp.protocols.kermit.misc:8202
On November 20th, Clarence Dold (dold@94.usenet.us.com) wrote:
: Joe Doupnik (jrd@cc.usu.edu) wrote:
: : > output logout\13
: :
: : What's likely the problem is the sequence of OUTPUT statments
: : blasts their strings at the host with no time delay. It may very well
:
: I have a problem with a long script session going to a telephone switch...
: I am reprogramming information to accomodate area code splits, which is
: just such a wonderful use of Unix awk, c-kermit development, and MS-Kermit
: or C-Kermit execution (but I digress...)
:
: I use input statements, I use pause statements, and I had to set output
: pacing 500, in order to keep from overrunning the switch, even at 2400
: baud. There is no flow control available on the line.
:
: My .tak script (actually 14,000 lines long in this case)
: set output pacing 500
: output 1370444 \13
: input 20 CHANGE
: pause 2
: output \9\9\9\9\9\9 182 \13
: input 20 ACP
: pause 2
: output 1370430 \13
: input 20 CHANGE
:
: If I lower either the output pacing, or reduce the pause to 1, the switch
: can't keep up. If I reduce the pause, even with the INPUT in place, the
: commands get garbled. If I reduce the output pacing, occasional characters
: get dropped.
:
: I can't remember where I found the description for "output pacing". I
: can't find it in the Using C-Kermit manual.
:
: In Unix, the cu dialer has a feature called "echo check", where each
: character is held until the previous character has been echoed back
: correctly. Is such a pacing option available in C-Kermit?
:
As noted in my earlier reply, no. I finally got around to looking into
adding it, and it's not as easy as it might seem, given the facts that the
OUTPUT command is (a) buffered for efficiency, and thus does block writes
rather than single-character ones; (b) might contain \N, \B, or \L escapes
for NUL or BREAK, which might or might not be echoed; (c) in Kermit 95 also
allows \Kverbs; etc etc.
It turns out to be much easier to do this with a little macro than in the
C-Kermit code (C-Kermit 6.0 required):
define XOUTPUT {
local \%c
set output pacing 0
while defined \%1 {
asg \%c \fsubstr(\%1,1,1)
asg \%1 \fsubstr(\%1,2)
output \%c
input 2 \%c
}
}
Usage: xoutput string-with-no-spaces
or: xoutput { string that contains spaces }
It sends one character at a time and then waits up to 2 seconds for the
character to be echoed back, but continues to the next character as soon
as the echo appears, so no time is wasted. You can add an IF FAIL clause
after the INPUT in case you want to do something special about failure
to detect an echo within the timeout period. Obviously you can also change
the 2-second limit, and adjust the script in any other desired way.
- Frank